<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>对象</title>
		<script>
			function Dog(name,age){
				this.name=name;
				this.age=age;
				this.show=function(){
					alert(this.name+","+this.age+",种类："+this.type);
				}
			}
			Dog.prototype.type="中国土狗";
			
			var d1=new Dog("大黄",3);
			var d2=new Dog("二黄",1);
			d2.type="藏獒";
			d1.show();
			d2.show();
			alert(d1.constructor==Dog);
			alert(d2.constructor==Dog);
			alert(d1 instanceof Dog);
			alert(d1 instanceof Object);	
		</script>
	</head>
	<body>
	</body>
</html>